<?php
namespace app\admin\validate;

use think\Validate;

class ExamQuestion extends Validate
{
    protected $rule = [
        'type'    => 'require|in:single,multi,judge,blank,short',
        'content' => 'require',
        'score'   => 'require|integer|egt:0',
    ];
    protected $message = [
        'type.require' => '题型不能为空',
        'type.in'      => '题型不合法',
        'content.require' => '题干不能为空',
        'score.require' => '分值不能为空',
        'score.integer' => '分值必须为整数',
        'score.egt'     => '分值不能小于0',
    ];
}
